﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ZP.DTO.Common
{
    public class ZPMenuNodeModel
    {
        public ZPMenuNodeModel() { }
        //layui tree
        public ZPMenuNodeModel(string title, int id,string field, string href, bool spread, bool @checked, bool disabled, List<ZPMenuNodeModel> children)
        {
            this.title = title;
            this.field = field;
            this.id = id;
            this.href = href;
            this.spread = spread;
            this.@checked = @checked;
            this.disabled = disabled;
            this.children = children;
        }
        public string title { get; set; }
        public string field { get; set; }    //节点标题
        public int id { get; set; }    //节点唯一索引值，用于对指定节点进行各类操作
        public string href { get; set; }   //节点是否初始展开，默认 false
        public bool spread { get; set; }
        public bool @checked { get; set; }   //节点是否初始为选中状态（如果开启复选框的话），默认 false
        public bool disabled { get; set; }   //节点是否为禁用状态。默认 false
        public List<ZPMenuNodeModel> children { get; set; }    //子节点。支持设定选项同父节点

        //eleTree
        //public ZPMenuNodeModel(string pid, string label, int id, bool isOpen, bool isLeaf, bool @checked, bool disabled, List<ZPMenuNodeModel> children)
        //{
        //    this.pid = pid;
        //    this.label = label;
        //    this.id = id;
        //    this.isOpen = isOpen;
        //    this.isLeaf = isLeaf;
        //    this.@checked = @checked;
        //    this.disabled = disabled;
        //    this.children = children;
        //}
        //public string pid { get; set; }
        //public string label { get; set; }    //节点标题
        //public int id { get; set; }    //节点唯一索引值，用于对指定节点进行各类操作
        //public bool isOpen { get; set; }   //节点是否初始展开，默认 false
        //public bool isLeaf { get; set; }
        //public bool @checked { get; set; }   //节点是否初始为选中状态（如果开启复选框的话），默认 false
        //public bool disabled { get; set; }   //节点是否为禁用状态。默认 false
        //public List<ZPMenuNodeModel> children { get; set; }    //子节点。支持设定选项同父节点
    }
}
